Skip to content

Fix WinGet updates being hidden by the "already upgraded" cache (#5042)#5072

Merged
Gabriel Dufresne (GabrielDuf) merged 1 commit into
mainfrom
fix/winget-updates-missing-5042
Jul 10, 2026
Merged

Fix WinGet updates being hidden by the "already upgraded" cache (#5042)#5072
Gabriel Dufresne (GabrielDuf) merged 1 commit into
mainfrom
fix/winget-updates-missing-5042

Conversation

@GabrielDuf

Copy link
Copy Markdown
Contributor

This pull request updates how the "already upgraded" cache is handled when listing available package updates, addressing an issue where recently upgraded packages could be hidden from update lists indefinitely. The new logic ensures that such packages are only suppressed from the update list once, then reappear on subsequent scans if still outdated. This improves accuracy and user experience, especially in cases where the CLI index lags behind real package state.

Improvements to update suppression logic:

  • Added the ConsumeAlreadyUpgradedSuppression method to WinGetPkgOperationHelper, which hides a just-upgraded package only once and then clears the suppression mark, so outdated packages reappear on the next scan (issue [BUG] 4 updates are missing #5042).
  • Replaced calls to UpdateAlreadyInstalled with ConsumeAlreadyUpgradedSuppression in WinGetCliHelper.cs and PingetCliHelper.cs, ensuring the new one-shot suppression logic is used when listing available updates.
  • In NativeWinGetHelper.cs, removed the "already upgraded" cache check entirely and now always trusts the COM IsUpdateAvailable property, further preventing packages from being hidden incorrectly.

Testing and validation:

  • Added comprehensive tests for ConsumeAlreadyUpgradedSuppression in WinGetManagerTests.cs, covering scenarios where the suppression mark is present, absent, or mismatched with the available version.

@GabrielDuf Gabriel Dufresne (GabrielDuf) merged commit 2111637 into main Jul 10, 2026
5 checks passed
@GabrielDuf Gabriel Dufresne (GabrielDuf) deleted the fix/winget-updates-missing-5042 branch July 10, 2026 20:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants